<div id="tablecontent" class="col-md-12">						
    <div class="form-group">
        <div class="table-responsive">
            <table class="table table-bordered table-condensed table-striped" style="background:#f9f9f9;">
                <thead>
                    <tr>
						<th class="tblhead" style="width:10px;text-align:center;">No</th>
						<th class="tblhead" style="width:15px;text-align:center;">Messenger Name</th>
						<th class="tblhead" style="width:15px;text-align:center;">Picket Date</th>
						<th class="tblhead" style="width:15px;text-align:center;">Assign To</th>
						<th class="tblhead" style="width:15px;text-align:center;">Status</th>
						<th class="tblhead" style="width:15px;text-align:center;">Action</th>
					</tr>
                </thead>
                <tbody>
                    <?php
                    if (empty($list_data)) {
                        ?>
                        <tr><td colspan="8" style="text-align:center">No Data Available</td></tr>
                        <?php
                    } else {
                        $i = 0;
                        foreach ($list_data as $row) {
                            ?>
                            <tr>
                                <?php
                                $messenger_name = $row["MESSENGER_NAME"];
                                $messenger_date = $row["TRANS_DATE"];
                                $messenger_status = $row["TRANS_STATUS"];
                                $status = $row["TRANS_APP"];
                                $messenger_trans_id = $row['TRANS_ID'];

                                $status_app = '';
                                if ($status == 'Y') {
                                    $status_app = '<font color="blue">Approved</font>';
                                }

                                if ($status == 'N') {
                                    //$status_app = '<font color="red">Not Approved</font>';
									$status_app = 'Approve Now';
                                }
                                ?>  

                                <td bgcolor="#FFFFFF" class="tbl-content-c" style="text-align:center;"><?php echo $row["RECNUM"]; ?>.</td>
                                <td bgcolor="#FFFFFF" class="tbl-content-c" style="text-align:left;"><?php echo ucfirst($messenger_name); ?></td>
                                <td bgcolor="#FFFFFF" class="tbl-content-c" style="text-align:center;"><?php echo $messenger_date; ?></td>
                                <td bgcolor="#FFFFFF" class="tbl-content-c" style="text-align:center;"><?php echo $messenger_status; ?></td>
                                
								<!--td style="text-align:center;">
                                    <input type=checkbox name="trans_app[<?php echo $i; ?>]" value="Y" checked /> Y
                                    <input type="hidden" name="trans_id[<?php echo $i; ?>]" value="<?php echo $messenger_trans_id; ?>"/>
                                </td-->
								
								<td bgcolor="#FFFFFF" class="tbl-content-c" style="text-align:center;">
									<?php if($status=='N') :?>
										<?php echo '<font color="red">Not Approved</font>'; ?>
									<?php else: ?>
										<?php echo '<font color="blue">Approved</font>'; ?>
									<?php endif; ?>
								</td>
								
								<td bgcolor="#FFFFFF" class="tbl-content-c" style="text-align:center;">
									<?php if($status=='N') :?>
										<a class="btn btn-sm btn-primary" href="#" onclick="approve_now('<?php echo $messenger_trans_id ?>', '<?php echo $status ?>');">
										<?php echo $status_app; ?></a>
									<?php else: ?>
										<a class="btn btn-sm btn-primary" href="#" onclick="approve_now('<?php echo $messenger_trans_id ?>', '<?php echo $status ?>');">
										<?php echo 'Not Approve' ?></a>
									<?php endif; ?>
								</td>
                            </tr>
                            <?php
                            $i++;
                        }
                    }
                    ?>
					<input type=hidden name="jumlah_row" value="<?php echo "$i"; ?>"/>
                </tbody>
            </table>
            <!--input type="submit" value="Submit" name="submit" title="Submit this form" /-->
        </div>
    </div>					
</div>